package com.xtpt.disaster.common;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.Properties;

/**
 * config.properties 中的配置信息  启动时加载
 */
@Component
@Data
@PropertySource("classpath:config/config.properties")
public class PropertyConfig {

    @Value("${server_ip}")
    private  String serverIp;

    @Value("${server_port}")
    private  String serverPort;

    @Value("${server_app}")
    private  String serverApp;

    @Value("${server_account}")
    private  String serverAccount;

    @Value("${server_password}")
    private  String serverPassword;

    @Value("${server_ssh_port}")
    private String serverSshPort;

    @Value("${server_os_type}")
    private Integer serverOsType;

    @Value("${qutarz_server_ip}")
    private  String quartzServerIp;

    @Value("${qutarz_server_port}")
    private  String quartzServerPort;

    @Value("${qutarz_server_app}")
    private  String quartzServerApp;

    @Value("${root_path}")
    private  String rootPath;

    @Value("${windows_client_path}")
    private String windowsClientPath;

    @Value("${linux_client_path}")
    private String linuxClientPath;

    @Value("${scp_need_pass}")
    private boolean scpNeedPass;

    @Value("${back_file_extend}")
    private String backFileExtend;

    /**
     * @Description: 用于临时替换命令中非预期的空格
     * @Author: hpc
     * @Date: 2021/12/31 下午 3:41
     **/
    @Value("${blank_space_replace}")
    private String blankSpaceReplace;

    @Value("${qutarz_server_ip}")
    private String qutarz_server_ip;

    @Value("${server_ip}")
    private String server_ip;

    @Value("${qutarz_server_port}")
    private String qutarz_server_port;

    @Value("${quartz_add}")
    private String quartz_add;

    @Value("${mysql_exec_path}")
    private String mysqlExecPath;

    public String getServerIp() {
        return serverIp;
    }

    public void setServerIp(String serverIp) {
        this.serverIp = serverIp;
    }

    public String getServerPort() {
        return serverPort;
    }

    public void setServerPort(String serverPort) {
        this.serverPort = serverPort;
    }

    public String getServerApp() {
        return serverApp;
    }

    public void setServerApp(String serverApp) {
        this.serverApp = serverApp;
    }

    public String getServerAccount() {
        return serverAccount;
    }

    public void setServerAccount(String serverAccount) {
        this.serverAccount = serverAccount;
    }

    public String getServerPassword() {
        return serverPassword;
    }

    public void setServerPassword(String serverPassword) {
        this.serverPassword = serverPassword;
    }

    public String getServerSshPort() {
        return serverSshPort;
    }

    public void setServerSshPort(String serverSshPort) {
        this.serverSshPort = serverSshPort;
    }

    public String getQuartzServerIp() {
        return quartzServerIp;
    }

    public void setQuartzServerIp(String quartzServerIp) {
        this.quartzServerIp = quartzServerIp;
    }

    public String getQuartzServerPort() {
        return quartzServerPort;
    }

    public void setQuartzServerPort(String quartzServerPort) {
        this.quartzServerPort = quartzServerPort;
    }

    public String getQuartzServerApp() {
        return quartzServerApp;
    }

    public void setQuartzServerApp(String quartzServerApp) {
        this.quartzServerApp = quartzServerApp;
    }

    public String getRootPath() {
        return rootPath;
    }

    public void setRootPath(String rootPath) {
        this.rootPath = rootPath;
    }

    public String getWindowsClientPath() {
        return windowsClientPath;
    }

    public void setWindowsClientPath(String windowsClientPath) {
        this.windowsClientPath = windowsClientPath;
    }

    public String getLinuxClientPath() {
        return linuxClientPath;
    }

    public void setLinuxClientPath(String linuxClientPath) {
        this.linuxClientPath = linuxClientPath;
    }

    public boolean isScpNeedPass() {
        return scpNeedPass;
    }

    public void setScpNeedPass(boolean scpNeedPass) {
        this.scpNeedPass = scpNeedPass;
    }

    public String getBackFileExtend() {
        return backFileExtend;
    }

    public void setBackFileExtend(String backFileExtend) {
        this.backFileExtend = backFileExtend;
    }

    public String getQutarz_server_ip() {
        return qutarz_server_ip;
    }

    public void setQutarz_server_ip(String qutarz_server_ip) {
        this.qutarz_server_ip = qutarz_server_ip;
    }

    public String getServer_ip() {
        return server_ip;
    }

    public void setServer_ip(String server_ip) {
        this.server_ip = server_ip;
    }

    public String getQutarz_server_port() {
        return qutarz_server_port;
    }

    public void setQutarz_server_port(String qutarz_server_port) {
        this.qutarz_server_port = qutarz_server_port;
    }

    public String getQuartz_add() {
        return quartz_add;
    }

    public void setQuartz_add(String quartz_add) {
        this.quartz_add = quartz_add;
    }

    public String getMysqlExecPath() {
        return mysqlExecPath;
    }

    public void setMysqlExecPath(String mysqlExecPath) {
        this.mysqlExecPath = mysqlExecPath;
    }
}
